﻿<phone:PhoneApplicationPage 
    x:Class="MediaPlayerDemo.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait" Orientation="Portrait"
    mc:Ignorable="d" d:DesignWidth="480" d:DesignHeight="768"
    shell:SystemTray.IsVisible="True">

    <Grid x:Name="LayoutRoot" Background="Transparent">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>

        <StackPanel x:Name="TitlePanel" Grid.Row="0" Margin="24,24,0,12">
            <TextBlock x:Name="PageTitle" Text="MediaPlayerDemo" Margin="-3,-8,0,0" 
                       Style="{StaticResource PhoneTextTitle1Style}" FontSize="48" />
        </StackPanel>

        <Grid x:Name="ContentGrid" Grid.Row="1">
            <MediaElement Height="289" HorizontalAlignment="Left" 
                          Margin="26,148,0,0" x:Name="mediaPlayer" 
                          VerticalAlignment="Top" Width="417" 
                          AutoPlay="False"/>
            <Button Content="&gt;" Height="72" 
                    HorizontalAlignment="Left" Margin="13,527,0,0" 
                    x:Name="btnPlay" VerticalAlignment="Top" Width="87" 
                    Click="btnPlay_Click" />
            <Button Content="O" Height="72" 
                    HorizontalAlignment="Right" Margin="0,527,243,0" 
                    x:Name="btnStop" VerticalAlignment="Top" Width="87" 
                    Click="btnStop_Click" />
            <Button Content="||" Height="72" Margin="0,527,313,0" 
                    x:Name="btnPause" VerticalAlignment="Top" 
                    Click="btnPause_Click" HorizontalAlignment="Right" Width="87" />
            <Slider Height="84" HorizontalAlignment="Left" 
                    Margin="13,423,0,0" Name="mediaTimeline" 
                    VerticalAlignment="Top" Width="443" 
                    ValueChanged="mediaTimeline_ValueChanged" 
                    Maximum="1" LargeChange="0.1" />
            <TextBlock Height="30" HorizontalAlignment="Left" 
                       Margin="26,472,0,0" Name="lblStatus" 
                       Text="00:00" VerticalAlignment="Top" Width="88" FontSize="16" />
            <TextBlock Height="30" 
            	Margin="118,472,222,0" x:Name="lblBuffering" 
            	Text="Buffering" VerticalAlignment="Top" FontSize="16" />
            <TextBlock Height="30" 
            	Margin="0,472,82,0" x:Name="lblDownload" 
            	Text="Download" VerticalAlignment="Top" FontSize="16" HorizontalAlignment="Right" Width="140" />
            <Button Content="Mute" Height="72" 
                    HorizontalAlignment="Left" Margin="217,527,0,0" 
                    Name="btnMute" VerticalAlignment="Top" Width="89" 
                    FontSize="16" Click="btnMute_Click" />
            <TextBlock Height="30" HorizontalAlignment="Left" 
                       Margin="315,551,0,0" Name="lblSoundStatus" 
                       Text="Sound On" VerticalAlignment="Top" Width="128" />
            <Button Content="Use MediaPlayerLauncher" FontSize="24" Height="72" 
                    HorizontalAlignment="Left" Margin="13,591,0,0" 
                    Name="btnMediaPlayerLauncher" VerticalAlignment="Top" 
                    Width="411" Click="btnMediaPlayerLauncher_Click" />
            <TextBox x:Name="txtUrl" Height="57" Margin="91,33,8,0" 
                     TextWrapping="Wrap" VerticalAlignment="Top" FontSize="16" 
                     Text="http://ecn.channel9.msdn.com/o9/ch9/7/8/2/9/1/5/ARCastMDISilverlightGridComputing_ch9.wmv"/>
            <TextBlock x:Name="lblUrl" HorizontalAlignment="Left" Height="25" 
                       Margin="8,48,0,0" TextWrapping="Wrap" Text="Video URL:" 
                       VerticalAlignment="Top" Width="83" FontSize="16"/>
            <TextBox x:Name="txtBufferingTime" Height="57" Margin="151,78,0,0" 
                     TextWrapping="Wrap" VerticalAlignment="Top" FontSize="16" HorizontalAlignment="Left" Width="86" Text="20"/>
            <TextBlock x:Name="lblBufferingTime" HorizontalAlignment="Left" 
                       Height="25" Margin="8,93,0,0" TextWrapping="Wrap" 
                       Text="Buffering Time (s):" VerticalAlignment="Top" 
                       Width="139" FontSize="16"/>
        </Grid>
    </Grid>

</phone:PhoneApplicationPage>
